package com.demo.security.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.demo.common.BasicEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;


@Data
@TableName("user")
public class SysUser extends BasicEntity<SysUser> {

    @TableField("code")
    private String code;
    @ApiModelProperty(value = "用户名(varchar(32))")
    @NotBlank(message = "用户名称不能为空", groups = {UserSign.class})
    @TableField("username")
    private String username;

    @ApiModelProperty(value = "用户名(char(14))")
    @NotBlank(message = "手机号称不能为空", groups = {UserSign.class})
    @TableField("name")
    private String phone;

    @ApiModelProperty(value = "密码(varchar(32))")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "状态(0停用,1正常)(int(1))")
    @TableField("status")
    private Integer status;

    private Long roleId;

    private String role;

    public interface UserSign{}
}
